using System;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using BoOnce.Components;
using System.Collections.Generic;
using BoOnce.Helpers;
using BoOnce.Menu;
using BoOnce.Core;

namespace BoOnce.Steps
{
    class MenuStep : Step
    {
        private BoOnce.Menu.Menu _Menu;

        public MenuStep(Game game)
            : base(game,"Menu")
        {
            _Menu = new BoOnce.Menu.Menu(Game);
            MainMenu mainMenu = new MainMenu(_Menu);
            OptionMenu optionMenu = new OptionMenu(_Menu);

            _Menu.Add("main", mainMenu);
            _Menu.Add("option", optionMenu);
            
            Logger.WriteInfo(this, "Initialized");
        }

        public override void LoadContent()
        {
            //foreach (MenuScreen screen in _MenuScreens)
            //{
            //    screen.LoadContent();
            //}
            base.LoadContent();
        }

        public override void UnloadContent()
        {
            //_SpriteBatch.Dispose();
            //foreach (MenuScreen screen in _MenuScreens)
            //{
            //    screen.UnloadContent();
            //}
        }

        public override void Draw(GameTime gameTime)
        {
            _Menu.Draw(gameTime);
        }

        public override void Update(GameTime gameTime)
        {
            _Menu.Update(gameTime);
        }
    }
}
